package com.hns.frame.hibernate;

import org.hibernate.cfg.ImprovedNamingStrategy;

/**
 * hibernate 对应表大小写设置
 * @author:Fisher
 * @email:zhuangcaijin@126.com
 * @version Revision 2.0.0
 */
public class AppNamingStrategy extends ImprovedNamingStrategy {
    
    private static final long serialVersionUID = 1L;
    
    @Override
    public String columnName(String columnName) {
        return addUnderscores(columnName).toUpperCase();
    }
    
    @Override
    public String tableName(String tableName) {
        return addUnderscores(tableName).toUpperCase();
    }
    
    @Override
    public String propertyToColumnName(String propertyName) {
        return addUnderscores(propertyName).toUpperCase();
    }
}
